<?php

/**
 * GcAlunoTurmaDisciplina form base class.
 *
 * @method GcAlunoTurmaDisciplina getObject() Returns the current form's model object
 *
 * @package    GC
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseGcAlunoTurmaDisciplinaForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'aluno_id'            => new sfWidgetFormInputHidden(),
      'turma_disciplina_id' => new sfWidgetFormInputHidden(),
      'nti1'                => new sfWidgetFormInputText(),
      'nti2'                => new sfWidgetFormInputText(),
      'npc'                 => new sfWidgetFormInputText(),
      'provao'              => new sfWidgetFormInputText(),
      'feira'               => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'aluno_id'            => new sfValidatorChoice(array('choices' => array($this->getObject()->get('aluno_id')), 'empty_value' => $this->getObject()->get('aluno_id'), 'required' => false)),
      'turma_disciplina_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('turma_disciplina_id')), 'empty_value' => $this->getObject()->get('turma_disciplina_id'), 'required' => false)),
      'nti1'                => new sfValidatorNumber(array('required' => false)),
      'nti2'                => new sfValidatorNumber(array('required' => false)),
      'npc'                 => new sfValidatorNumber(array('required' => false)),
      'provao'              => new sfValidatorNumber(array('required' => false)),
      'feira'               => new sfValidatorNumber(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('gc_aluno_turma_disciplina[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'GcAlunoTurmaDisciplina';
  }

}
